public class Interview53_2 {
    public static int  missingNumber(int[] nums) {
        int sum = 0;
        for(int i = 0;i < nums.length;i++){
            sum +=nums[i];
        }
        int sums = (nums.length + 1)*nums.length/2;
        return sum - sums;
    }
}
